function initTable(searchValue){
	var height=hheight-135;
	$('#dataTable').datagrid({
		width:'100%',
		height:height,
		nowrap: true,
		autoRowHeight: false,
		striped: true,
		collapsible:true,
		url:basePath + 'goods/goodsSysDeliversAddress_list.do',
		singleSelect:true,
		columns:[[
			    {field:'id',checkbox:true},
			    {title:'医院NO',field:'hospitalNo',width:'17%',hidden:true},
			    {title:'医院名称',field:'hospitalName',width:'20%'},
			    {title:'科室编号',field:'orgNo',width:'20%',hidden:true},
			    {title:'科室名称',field:'orgName',width:'20%'},
			    {title:'中心送货地址NO',field:'daddressCenterNo',hidden:true},
			    {title:'中心送货地址',field:'daddressCenter',hidden:true},
			    {title:'院内送货地址NO',field:'daddressHospitalNo',width:'23%'},
			    {title:'院内送货地址',field:'daddressHospital',width:'45%'}
		]],
		pageNumber:1,//当设置了 pagination 特性时，初始化页码 
		pageSize: 15,//当设置了 pagination 特性时，初始化页码尺寸，即每页显示的记录条数，默认为10
		pageList:[15,20,30,50],
		queryParams:{//当请求远程数据时，发送的额外参数 
			searchValue:searchValue
		},
		pagination:true,
		rownumbers:true
		
	});
}
$(function(){
	//initlUserHospitalDeptInfo();
	var hospitalNo = $('#hospitalNo').val();
	var orgNo = $('#orgNo').val();
	var searchValue = "{'hospitalNo':'" + hospitalNo + "'}";
	searchValue += "{'orgNo':'" + orgNo +"'}";
	doSearch();
//	initTable(searchValue);
});
//查询
function doSearch(){
	var searchValue = "{";
	  		var hospitalNo = $('#hospitalNo').val();
	  		searchValue += '"hospitalNo":"'+hospitalNo+'",';
	  		var daddressCenterNo = $('#daddressCenterNo').val();
	  		searchValue += '"daddressCenterNo":"'+daddressCenterNo+'",';
	  		var daddressHospitalNo = $('#daddressHospitalNo').val();
	  		searchValue += '"daddressHospitalNo":"'+daddressHospitalNo+'",';
	  		searchValue +='"orgNo":"'+orgNo+'",';
	  		if(vc.endWith(searchValue,",")){
	  	searchValue = searchValue.substring(0,searchValue.length-1);
	  }
	  searchValue += "}";
	  initTable(searchValue);
}

//选择院内送货地址
function do_select(){
	var row = $('#dataTable').datagrid('getSelected');
	if (!row) {
		alert('请选择一条记录！');
		return;
	}
	parent.resignAddress(row);
}

  